﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace install
{
    public class LocalConfig : SharedConfiguration.Config
    {
        public List<Idioma_clase> IdiomasString { get; set; }
        public List<Arquitectura_clase> ArqString { get; set; }
        public LocalConfig() : base ()
        {
            IdiomasString = new List<Idioma_clase>();
            ArqString = new List<Arquitectura_clase>();
        }
        public virtual void init()
        {
            this.Path = null;
            foreach (var item in this.Idiomas)
            {
                IdiomasString.Add(new Idioma_clase(item._idiomaenum));
            }
            foreach (var item in this.Arquitectura)
            {
                ArqString.Add(new Arquitectura_clase(item));
            }
        }
    }

    public class Idioma_clase
    {
        public SharedConfiguration.IdiomasEnum _idioma { get; private set; }
        public override string ToString()
        {
            switch (_idioma)
            {
                case SharedConfiguration.IdiomasEnum.Espanol:
                    return "Español";
                case SharedConfiguration.IdiomasEnum.Ingles:
                    return "Inglés";
                default:
                    return string.Empty;
            }
        }
        public Idioma_clase( SharedConfiguration.IdiomasEnum _idiom)
        {
            this._idioma = _idiom;
        }

    }
    public class Arquitectura_clase
    {
        public SharedConfiguration.ArquitecturaEnum _arquitectura { get; private set; }
        public override string ToString()
        {
            switch (_arquitectura)
            {
                case SharedConfiguration.ArquitecturaEnum.x86:
                    return "32 bits";
                case SharedConfiguration.ArquitecturaEnum.AMD64:
                    return "64 bits";
                default:
                    return string.Empty;
            }
        }
        public Arquitectura_clase (SharedConfiguration.ArquitecturaEnum _arq)
        {
            this._arquitectura = _arq;
        }
    }
}
